@props([
    'viewRoute' => null,
    'editRoute' => null,
    'deleteRoute' => null,
    'deleteMessage' => '确定要删除这个项目吗？',
    'customActions' => null
])

<div class="flex items-center space-x-2">
    @if($viewRoute)
        <a href="{{ $viewRoute }}" 
           class="text-indigo-600 hover:text-indigo-900">
            查看
        </a>
    @endif
    
    @if($editRoute)
        <a href="{{ $editRoute }}" 
           class="text-indigo-600 hover:text-indigo-900">
            编辑
        </a>
    @endif
    
    @if($deleteRoute)
        <form method="POST" action="{{ $deleteRoute }}" class="inline">
            @csrf
            @method('DELETE')
            <button type="submit" 
                    onclick="return confirm('{{ $deleteMessage }}')"
                    class="text-red-600 hover:text-red-900">
                删除
            </button>
        </form>
    @endif
    
    @if($customActions)
        {{ $customActions }}
    @endif
</div>
